home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / MENU.HDR < prev    next >
Text File  |  1994-04-25  |  3KB  |  90 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _Menu( nMenuTopRow, nMenuLeftCol, cMenuTitle, cMenuArray ) --> nSelection
  8.  
  9. PARAMETERS:
  10.  
  11. nMenuTopRow   : Menu Top Left ROW
  12. nMenuLeftCol  : Menu Top Left COLUMN
  13. cMenuTitle    : Menu Title
  14. cMenuArray    : Array of Menu Elements
  15.  
  16. SHORT:
  17.  
  18. General purpose menu facility.
  19.  
  20. DESCRIPTION:
  21.  
  22. _Menu() is a general purpose menuing facility.  It accepts as a parameter
  23. an array of character strings to be used as menu items.  It builds the
  24. menu, prompts for a selection and returns the number of the element
  25. selected as it's return value.  If ESC is pressed, it returns ZERO.
  26.  
  27. NOTE:
  28.  
  29. This function is the engine of _KMENU() which manages menu configurations
  30. external to the program (in data files) and makes calls to _menu() to display
  31. menus.
  32.  
  33. COLORS.  The menu uses a set of default colors.  If the default colors are
  34. not desireable, they may be changed by defining a few PRIVATE memory
  35. variables that will be in scope when the menu is called:
  36.  
  37. _FSDeskColor   // desktop color
  38. _FSHeadColor   // Top screen header color
  39. _FSBottColor   // bottom line color
  40. _FSNameColor   // menu name color
  41. _FSMenuColor   // menu body color
  42. _FSBordColor   // menu border color
  43. _FSItemColor   // menu item color
  44.  
  45. For a fairly decent monochrome scheme, try:
  46.  
  47. PRIVATE _FSDeskColor := 'w/n'
  48. PRIVATE _FSHeadColor := 'w+/n'
  49. PRIVATE _FSBottColor := 'n/w'
  50. PRIVATE _FSNameColor := 'n/w'
  51. PRIVATE _FSMenuColor := 'n/w'
  52. PRIVATE _FSBordColor := 'n/w'
  53. PRIVATE _FSItemColor := 'n/w,w/n'
  54.  
  55. The default colors are (These are the colors used by the KLIPDOCS.EXE
  56. program):
  57.  
  58. _FSHeadColor = 'b/w'
  59. _FSBottColor = 'n/w'
  60. _FSDeskColor = 'rb/b,w+/b'
  61. _FSMenuColor = 'n/w,w+/n'
  62. _FSBordColor = 'n/w,w+/n'
  63. _FSItemColor = 'n/w,w+/b'
  64. _FSNameColor = 'b/w'
  65.  
  66.  
  67. EXAMPLE:
  68.  
  69. MEMVAR acMainMenu
  70. PRIVATE acMainMenu[5]
  71.  
  72.  
  73. acMainMenu[1] = 'Menu Option One '
  74. acMainMenu[2] = 'Menu Option Two '
  75. acMainMenu[3] = 'Menu Option Three '
  76. acMainMenu[4] = 'Menu Option Four '
  77. acMainMenu[5] = 'Menu Option Five '
  78.  
  79.  
  80. nMenuOpt = _Menu(10,10,'MAIN MENU','acMainMenu')
  81.  
  82. Result: A light-bar menu is displayed with the array elements in mainmenu[]
  83. as selectable options.  Once an item is selected, the number of that option
  84. is returned as it's return value.  The TOP LEFT corner of the menu is at
  85. ROW 10, COL 10, and the bottom right hand corner is placed according to
  86. the number of array elements and the length of the FIRST (not longest)
  87. array element.
  88.  
  89. ******************************************************************************/
  90.